#ifndef _KEYVAL_HPP
#define	_KEYVAL_HPP

#include "Object.hpp"
#include "Allocate.hpp"

namespace object {
	class keyVal {
	public:
		keyVal(Object* key, Object* val) {
			_key = key;
			_val = val;
		}
		~keyVal() {
			if (_key != nullptr) {
				//_key->releaseRef();
				delete _key;
				MemoryMgr::getInstance().peekRefCount(_key);
				_key = nullptr;
			}
			if (_val != nullptr) {
				//_val->releaseRef();
				delete _val;
				MemoryMgr::getInstance().peekRefCount(_val);
				_val = nullptr;
			}
		}
	public:
		Object* _key{ nullptr };
		Object* _val{ nullptr };
	};
}

#endif // !_KEYVAL_HPP
